Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sfauvel/1990/refactor prometheus metrics using struct #1998

Merged
merged 23 commits into from
Oct 16, 2024

Conversation

sfauvel
Copy link
Collaborator

@sfauvel sfauvel commented Oct 11, 2024

Content

Create a new crate internal/mithril-metrics that provide tooling to simplify the creation of a metric service.

This PR includes the creation of a new crate that provide a MetricServer and a macro to simply declare a new metric service.

Pre-submit checklist

  • Branch
    • Tests are provided (if possible)
    • Crates versions are updated (if relevant)
    • CHANGELOG file is updated (if relevant)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
  • PR
    • No clippy warnings in the CI
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested
  • Documentation
    • Update README file (if relevant)
    • Update documentation website (if relevant)
    • Add dev blog post (if relevant)

Comments

Functions to update metrics are not removed to avoid too many change in the Signer. It will be done later.

Issue(s)

Closes #1990

Copy link

github-actions bot commented Oct 11, 2024

Test Results

    4 files  ±0     55 suites  +1   9m 38s ⏱️ +6s
1 355 tests  - 3  1 355 ✅  - 3  0 💤 ±0  0 ❌ ±0 
1 563 runs   - 3  1 563 ✅  - 3  0 💤 ±0  0 ❌ ±0 

Results for commit 98038e1. ± Comparison against base commit c50f79b.

♻️ This comment has been updated with latest results.

@sfauvel sfauvel force-pushed the sfauvel/1990/refactor_prometheus_metrics_using_struct branch from 44573fe to 5f32339 Compare October 14, 2024 08:21
internal/mithril-metric/src/commons.rs Outdated Show resolved Hide resolved
internal/mithril-metric/src/commons.rs Outdated Show resolved Hide resolved
internal/mithril-metric/src/commons.rs Outdated Show resolved Hide resolved
internal/mithril-metric/src/commons.rs Outdated Show resolved Hide resolved
@sfauvel sfauvel force-pushed the sfauvel/1990/refactor_prometheus_metrics_using_struct branch 3 times, most recently from 3090752 to 1c87643 Compare October 15, 2024 13:21
@sfauvel sfauvel marked this pull request as ready for review October 15, 2024 13:42
Copy link
Collaborator

@Alenar Alenar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, great works !

Usage looks really nice in the signer.

internal/mithril-metric/Makefile Outdated Show resolved Hide resolved
mithril-signer/src/metrics/service.rs Outdated Show resolved Hide resolved
mithril-signer/Cargo.toml Show resolved Hide resolved
internal/mithril-metric/src/server.rs Outdated Show resolved Hide resolved
internal/mithril-metric/src/helper.rs Outdated Show resolved Hide resolved
internal/mithril-metric/src/helper.rs Outdated Show resolved Hide resolved
internal/mithril-metric/src/helper.rs Outdated Show resolved Hide resolved
internal/mithril-metric/src/helper.rs Outdated Show resolved Hide resolved
internal/mithril-metric/src/lib.rs Show resolved Hide resolved
Copy link
Collaborator

@dlachaume dlachaume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Copy link
Member

@jpraynaud jpraynaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

internal/mithril-metric/src/metric.rs Outdated Show resolved Hide resolved
internal/mithril-metric/src/metric.rs Outdated Show resolved Hide resolved
mithril-signer/src/metrics/service.rs Outdated Show resolved Hide resolved
@sfauvel sfauvel force-pushed the sfauvel/1990/refactor_prometheus_metrics_using_struct branch from 0746b9d to cedeb26 Compare October 16, 2024 07:30
* mithril-metric from `0.0.1` to `0.1.0`
* mithril-common from `0.4.70` to `0.4.71`
* mithril-signer from `0.2.201` to `0.2.202`
@sfauvel sfauvel merged commit d1ce9a3 into main Oct 16, 2024
48 checks passed
@sfauvel sfauvel deleted the sfauvel/1990/refactor_prometheus_metrics_using_struct branch October 16, 2024 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor Prometheus metrics for signer
4 participants